Previous Book Contents Book Index Next

Inside Macintosh: /
QuickDraw 3D RAVE / QuickDraw 3D RAVE Reference
Application-Defined Routines


Public Draw Context Methods

To write a drawing engine, you need to implement a number of drawing methods, pointers to which are contained in a draw context structure (of type TQADrawContext). These functions are called whenever an application uses one of the drawing macros described earlier (in "Manipulating Draw Contexts," beginning on page 1-94). For example, when an application uses the QADrawPoint macro to draw a point in a draw context linked to your drawing engine, your engine's TQADrawPoint method is called.

A draw context structure is passed as the first parameter to all these draw context methods. This allows you to retrieve your draw context's private data, which is pointed to by the first field of that structure.

IMPORTANT
Most of the draw context methods declare the draw context structure passed to them as const, in which case you should not alter any fields of that structure. Only three methods are allowed to change fields of the draw context structure: TQASetFloat, TQASetInt, and TQASetPtr. Failure to heed the const declaration may cause any code calling your engine (including QuickDraw 3D) to fail.
Pointers to your drawing engine's public draw context methods are assigned to the fields of a draw context structure by your TQADrawPrivateNew method. See page 1-136 for details.


Subtopics
TQAGetFloat
TQASetFloat
TQAGetInt
TQASetInt
TQAGetPtr
TQASetPtr
TQADrawPoint
TQADrawLine
TQADrawTriGouraud
TQADrawTriTexture
TQASubmitVerticesGouraud
TQASubmitVerticesTexture
TQADrawTriMeshGouraud
TQADrawTriMeshTexture
TQADrawVGouraud
TQADrawVTexture
TQADrawBitmap
TQARenderStart
TQARenderEnd
TQARenderAbort
TQAFlush
TQASync
TQAGetNoticeMethod
TQASetNoticeMethod

Previous Book Contents Book Index Next

© Apple Computer, Inc.
28 AUG 1996